home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / g_quake / godelqc5.zip / PLAYER.QC < prev    next >
Text File  |  1996-09-24  |  22KB  |  704 lines

  1.  
  2. void() bubble_bob;
  3.  
  4. /*
  5. ==============================================================================
  6.  
  7. PLAYER
  8.  
  9. ==============================================================================
  10. */
  11.  
  12. $cd id1/models/player_4
  13. $origin 0 -6 24
  14. $base base              
  15. $skin skin
  16.  
  17. //
  18. // running
  19. //
  20. $frame axrun1 axrun2 axrun3 axrun4 axrun5 axrun6
  21.  
  22. $frame rockrun1 rockrun2 rockrun3 rockrun4 rockrun5 rockrun6
  23.  
  24. //
  25. // standing
  26. //
  27. $frame stand1 stand2 stand3 stand4 stand5
  28.  
  29. $frame axstnd1 axstnd2 axstnd3 axstnd4 axstnd5 axstnd6
  30. $frame axstnd7 axstnd8 axstnd9 axstnd10 axstnd11 axstnd12
  31.  
  32.  
  33. //
  34. // pain
  35. //
  36. $frame axpain1 axpain2 axpain3 axpain4 axpain5 axpain6
  37.  
  38. $frame pain1 pain2 pain3 pain4 pain5 pain6
  39.  
  40.  
  41. //
  42. // death
  43. //
  44.  
  45. $frame axdeth1 axdeth2 axdeth3 axdeth4 axdeth5 axdeth6
  46. $frame axdeth7 axdeth8 axdeth9
  47.  
  48. $frame deatha1 deatha2 deatha3 deatha4 deatha5 deatha6 deatha7 deatha8
  49. $frame deatha9 deatha10 deatha11
  50.  
  51. $frame deathb1 deathb2 deathb3 deathb4 deathb5 deathb6 deathb7 deathb8
  52. $frame deathb9
  53.  
  54. $frame deathc1 deathc2 deathc3 deathc4 deathc5 deathc6 deathc7 deathc8
  55. $frame deathc9 deathc10 deathc11 deathc12 deathc13 deathc14 deathc15
  56.  
  57. $frame deathd1 deathd2 deathd3 deathd4 deathd5 deathd6 deathd7
  58. $frame deathd8 deathd9
  59.  
  60. $frame deathe1 deathe2 deathe3 deathe4 deathe5 deathe6 deathe7
  61. $frame deathe8 deathe9
  62.  
  63. //
  64. // attacks
  65. //
  66. $frame nailatt1 nailatt2
  67.  
  68. $frame light1 light2
  69.  
  70. $frame rockatt1 rockatt2 rockatt3 rockatt4 rockatt5 rockatt6
  71.  
  72. $frame shotatt1 shotatt2 shotatt3 shotatt4 shotatt5 shotatt6
  73.  
  74. $frame axatt1 axatt2 axatt3 axatt4 axatt5 axatt6
  75.  
  76. $frame axattb1 axattb2 axattb3 axattb4 axattb5 axattb6
  77.  
  78. $frame axattc1 axattc2 axattc3 axattc4 axattc5 axattc6
  79.  
  80. $frame axattd1 axattd2 axattd3 axattd4 axattd5 axattd6
  81.  
  82.  
  83. /*
  84. ==============================================================================
  85. PLAYER
  86. ==============================================================================
  87. */
  88.  
  89. void() player_run;
  90.  
  91. void()  player_stand1 =[        $axstnd1,       player_stand1   ]
  92. {
  93.     self.weaponframe=0;
  94.     if (self.velocity_x || self.velocity_y)
  95.     {
  96.         self.walkframe=0;
  97.         player_run();
  98.         return;
  99.     }
  100.  
  101.     if (self.weapon == IT_AXE)
  102.     {
  103.         if (self.walkframe >= 12)
  104.             self.walkframe = 0;
  105.         self.frame = $axstnd1 + self.walkframe;
  106.     }
  107.     else
  108.     {
  109.         if (self.walkframe >= 5)
  110.             self.walkframe = 0;
  111.         self.frame = $stand1 + self.walkframe;
  112.     }
  113.     self.walkframe = self.walkframe + 1;    
  114. };
  115.  
  116. void()  player_run =[   $rockrun1,      player_run      ]
  117. {
  118.     self.weaponframe=0;
  119.     if (!self.velocity_x && !self.velocity_y)
  120.     {
  121.         self.walkframe=0;
  122.         player_stand1();
  123.         return;
  124.     }
  125.  
  126.     if (self.weapon == IT_AXE)
  127.     {
  128.         if (self.walkframe == 6)
  129.             self.walkframe = 0;
  130.         self.frame = $axrun1 + self.walkframe;
  131.     }
  132.     else
  133.     {
  134.         if (self.walkframe == 6)
  135.             self.walkframe = 0;
  136.         self.frame = self.frame + self.walkframe;
  137.     }
  138.     self.walkframe = self.walkframe + 1;
  139. };
  140.  
  141.  
  142. void()  player_shot1 =  [$shotatt1, player_shot2        ] {self.weaponframe=1;
  143. self.effects = self.effects | EF_MUZZLEFLASH;};
  144. void()  player_shot2 =  [$shotatt2, player_shot3        ] {self.weaponframe=2;};
  145. void()  player_shot3 =  [$shotatt3, player_shot4        ] {self.weaponframe=3;};
  146. void()  player_shot4 =  [$shotatt4, player_shot5        ] {self.weaponframe=4;};
  147. void()  player_shot5 =  [$shotatt5, player_shot6        ] {self.weaponframe=5;};
  148. void()  player_shot6 =  [$shotatt6, player_run  ] {self.weaponframe=6;};
  149.  
  150.  
  151. void()  player_axe1 =   [$axatt1, player_axe2   ] {self.weaponframe=1;};
  152. void()  player_axe2 =   [$axatt2, player_axe3   ] {self.weaponframe=2;};
  153. void()  player_axe3 =   [$axatt3, player_axe4   ] {self.weaponframe=3;W_FireAxe();};
  154. void()  player_axe4 =   [$axatt4, player_run    ] {self.weaponframe=4;};
  155.  
  156. void()  player_axeb1 =  [$axattb1, player_axeb2 ] {self.weaponframe=5;};
  157. void()  player_axeb2 =  [$axattb2, player_axeb3 ] {self.weaponframe=6;};
  158. void()  player_axeb3 =  [$axattb3, player_axeb4 ] {self.weaponframe=7;W_FireAxe();};
  159. void()  player_axeb4 =  [$axattb4, player_run   ] {self.weaponframe=8;};
  160.  
  161. void()  player_axec1 =  [$axattc1, player_axec2 ] {self.weaponframe=1;};
  162. void()  player_axec2 =  [$axattc2, player_axec3 ] {self.weaponframe=2;};
  163. void()  player_axec3 =  [$axattc3, player_axec4 ] {self.weaponframe=3;W_FireAxe();};
  164. void()  player_axec4 =  [$axattc4, player_run   ] {self.weaponframe=4;};
  165.  
  166. void()  player_axed1 =  [$axattd1, player_axed2 ] {self.weaponframe=5;};
  167. void()  player_axed2 =  [$axattd2, player_axed3 ] {self.weaponframe=6;};
  168. void()  player_axed3 =  [$axattd3, player_axed4 ] {self.weaponframe=7;W_FireAxe();};
  169. void()  player_axed4 =  [$axattd4, player_run   ] {self.weaponframe=8;};
  170.  
  171.  
  172. //============================================================================
  173.  
  174. void() player_nail1   =[$nailatt1, player_nail2  ] 
  175. {
  176.     self.effects = self.effects | EF_MUZZLEFLASH;
  177.  
  178.     if (!self.button0)
  179.         {player_run ();return;}
  180.     self.weaponframe = self.weaponframe + 1;
  181.     if (self.weaponframe == 9)
  182.         self.weaponframe = 1;
  183.  
  184.     if (self.weapon == IT_NAILGUN)
  185.     {
  186.         W_FireSpikes (4);
  187.         self.attack_finished = time + 0.2;
  188.     }
  189.     else
  190.     {
  191.         W_FireSpikes (0);
  192.         self.attack_finished = time + 0.2;
  193.     }
  194. };
  195. void() player_nail2   =[$nailatt2, player_nail1  ]
  196. {
  197.     self.effects = self.effects | EF_MUZZLEFLASH;
  198.  
  199.     if (!self.button0)
  200.         {player_run ();return;}
  201.     self.weaponframe = self.weaponframe + 1;
  202.     if (self.weaponframe == 9)
  203.         self.weaponframe = 1;
  204.     W_FireSpikes (-4);
  205.     self.attack_finished = time + 0.2;
  206. };
  207.  
  208. //============================================================================
  209.  
  210. void() player_light1   =[$light1, player_light2  ] 
  211. {
  212.     self.effects = self.effects | EF_MUZZLEFLASH;
  213.  
  214.     if ((!self.button0) || ((self.weaponnum > 0) && self.attack_finished>time))
  215.         {player_run ();return;}
  216.     self.weaponframe = self.weaponframe + 1;
  217.     if (self.weaponframe == 5)
  218.         self.weaponframe = 1;
  219.     if (self.weaponnum==0) W_FireLightning();
  220.     else W_FireSuperLightning();
  221. };
  222. void() player_light2   =[$light2, player_light1  ]
  223. {
  224.     self.effects = self.effects | EF_MUZZLEFLASH;
  225.  
  226.     if ((!self.button0) || ((self.weaponnum > 0) && self.attack_finished>time))
  227.         {player_run ();return;}
  228.     self.weaponframe = self.weaponframe + 1;
  229.     if (self.weaponframe == 5)
  230.         self.weaponframe = 1;
  231.     if (self.weaponnum==0) W_FireLightning();
  232.     else W_FireSuperLightning();
  233.     self.attack_finished = time + 0.2;
  234. };
  235.  
  236. //============================================================================
  237.  
  238.  
  239. void() player_rocket1   =[$rockatt1, player_rocket2  ] {self.weaponframe=1;
  240. self.effects = self.effects | EF_MUZZLEFLASH;};
  241. void() player_rocket2   =[$rockatt2, player_rocket3  ] {self.weaponframe=2;};
  242. void() player_rocket3   =[$rockatt3, player_rocket4  ] {self.weaponframe=3;};
  243. void() player_rocket4   =[$rockatt4, player_rocket5  ] {self.weaponframe=4;};
  244. void() player_rocket5   =[$rockatt5, player_rocket6  ] {self.weaponframe=5;};
  245. void() player_rocket6   =[$rockatt6, player_run  ] {self.weaponframe=6;};
  246.  
  247.  
  248. void(float num_bubbles) DeathBubbles;
  249.  
  250. void() PainSound =
  251. {
  252. local float             rs;
  253.  
  254.     if (self.health < 0)
  255.         return;
  256.  
  257.     if (damage_attacker.classname == "teledeath")
  258.     {
  259.         sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
  260.         return;
  261.     }
  262.  
  263. // water pain sounds
  264.     if (self.watertype == CONTENT_WATER && self.waterlevel == 3)
  265.     {
  266.         DeathBubbles(1);
  267.         if (random() > 0.5)
  268.             sound (self, CHAN_VOICE, "player/drown1.wav", 1, ATTN_NORM);
  269.         else
  270.             sound (self, CHAN_VOICE, "player/drown2.wav", 1, ATTN_NORM);
  271.         return;
  272.     }
  273.  
  274. // slime pain sounds
  275.     if (self.watertype == CONTENT_SLIME)
  276.     {
  277. // FIX ME       put in some steam here
  278.         if (random() > 0.5)
  279.             sound (self, CHAN_VOICE, "player/lburn1.wav", 1, ATTN_NORM);
  280.         else
  281.             sound (self, CHAN_VOICE, "player/lburn2.wav", 1, ATTN_NORM);
  282.         return;
  283.     }
  284.  
  285.     if (self.watertype == CONTENT_LAVA)
  286.     {
  287.         if (random() > 0.5)
  288.             sound (self, CHAN_VOICE, "player/lburn1.wav", 1, ATTN_NORM);
  289.         else
  290.             sound (self, CHAN_VOICE, "player/lburn2.wav", 1, ATTN_NORM);
  291.         return;
  292.     }
  293.  
  294.     if (self.pain_finished > time)
  295.     {
  296.         self.axhitme = 0;
  297.         return;
  298.     }
  299.     self.pain_finished = time + 0.5;
  300.  
  301. // don't make multiple pain sounds right after each other
  302.  
  303. // ax pain sound
  304.     if (self.axhitme == 1)
  305.     {
  306.         self.axhitme = 0;
  307.         sound (self, CHAN_VOICE, "player/axhit1.wav", 1, ATTN_NORM);
  308.         return;
  309.     }
  310.     
  311.  
  312.     rs = rint((random() * 5) + 1);
  313.  
  314.     self.noise = "";
  315.     if (rs == 1)
  316.         self.noise = "player/pain1.wav";
  317.     else if (rs == 2)
  318.         self.noise = "player/pain2.wav";
  319.     else if (rs == 3)
  320.         self.noise = "player/pain3.wav";
  321.     else if (rs == 4)
  322.         self.noise = "player/pain4.wav";
  323.     else if (rs == 5)
  324.         self.noise = "player/pain5.wav";
  325.     else
  326.         self.noise = "player/pain6.wav";
  327.  
  328.     sound (self, CHAN_VOICE, self.noise, 1, ATTN_NORM);
  329.     return;
  330. };
  331.  
  332. void()  player_pain1 =  [       $pain1, player_pain2    ] {PainSound();};
  333. void()  player_pain2 =  [       $pain2, player_pain3    ] {};
  334. void()  player_pain3 =  [       $pain3, player_pain4    ] {};
  335. void()  player_pain4 =  [       $pain4, player_pain5    ] {};
  336. void()  player_pain5 =  [       $pain5, player_pain6    ] {};
  337. void()  player_pain6 =  [       $pain6, player_run      ] {};
  338.  
  339. void()  player_axpain1 =        [       $axpain1,       player_axpain2  ] {PainSound();self.weaponframe=0;};
  340. void()  player_axpain2 =        [       $axpain2,       player_axpain3  ] {};
  341. void()  player_axpain3 =        [       $axpain3,       player_axpain4  ] {};
  342. void()  player_axpain4 =        [       $axpain4,       player_axpain5  ] {};
  343. void()  player_axpain5 =        [       $axpain5,       player_axpain6  ] {};
  344. void()  player_axpain6 =        [       $axpain6,       player_run      ] {};
  345.  
  346. void() player_pain =
  347. {
  348.     if (self.weaponframe)
  349.         return;
  350.  
  351.     if (self.invisible_finished > time)
  352.         return;         // eyes don't have pain frames
  353.  
  354.     if (self.weapon == IT_AXE)
  355.         player_axpain1 ();
  356.     else
  357.         player_pain1 ();
  358. };
  359.  
  360. void() player_diea1;
  361. void() player_dieb1;
  362. void() player_diec1;
  363. void() player_died1;
  364. void() player_diee1;
  365. void() player_die_ax1;
  366.  
  367. void() DeathBubblesSpawn =
  368. {
  369. local entity    bubble;
  370.     if (self.owner.waterlevel != 3)
  371.         return;
  372.     bubble = spawn();
  373.     setmodel (bubble, "progs/s_bubble.spr");
  374.     setorigin (bubble, self.owner.origin + '0 0 24');
  375.     bubble.movetype = MOVETYPE_NOCLIP;
  376.     bubble.solid = SOLID_NOT;
  377.     bubble.velocity = '0 0 15';
  378.     bubble.nextthink = time + 0.5;
  379.     bubble.think = bubble_bob;
  380.     bubble.classname = "bubble";
  381.     bubble.frame = 0;
  382.     bubble.cnt = 0;
  383.     setsize (bubble, '-8 -8 -8', '8 8 8');
  384.     self.nextthink = time + 0.1;
  385.     self.think = DeathBubblesSpawn;
  386.     self.air_finished = self.air_finished + 1;
  387.     if (self.air_finished >= self.bubble_count)
  388.         remove(self);
  389. };
  390.  
  391. void(float num_bubbles) DeathBubbles =
  392. {
  393. local entity    bubble_spawner;
  394.     
  395.     bubble_spawner = spawn();
  396.     setorigin (bubble_spawner, self.origin);
  397.     bubble_spawner.movetype = MOVETYPE_NONE;
  398.     bubble_spawner.solid = SOLID_NOT;
  399.     bubble_spawner.nextthink = time + 0.1;
  400.     bubble_spawner.think = DeathBubblesSpawn;
  401.     bubble_spawner.air_finished = 0;
  402.     bubble_spawner.owner = self;
  403.     bubble_spawner.bubble_count = num_bubbles;
  404.     return;
  405. };
  406.  
  407.  
  408. void() DeathSound =
  409. {
  410. local float             rs;
  411.  
  412.     // water death sounds
  413.     if (self.waterlevel == 3)
  414.     {
  415.         DeathBubbles(20);
  416.         sound (self, CHAN_VOICE, "player/h2odeath.wav", 1, ATTN_NONE);
  417.         return;
  418.     }
  419.     
  420.     rs = rint ((random() * 4) + 1);
  421.     if (rs == 1)
  422.         self.noise = "player/death1.wav";
  423.     if (rs == 2)
  424.         self.noise = "player/death2.wav";
  425.     if (rs == 3)
  426.         self.noise = "player/death3.wav";
  427.     if (rs == 4)
  428.         self.noise = "player/death4.wav";
  429.     if (rs == 5)
  430.         self.noise = "player/death5.wav";
  431.  
  432.     sound (self, CHAN_VOICE, self.noise, 1, ATTN_NONE);
  433.     return;
  434. };
  435.  
  436.  
  437. void() PlayerDead =
  438. {
  439.     self.nextthink = -1;
  440. // allow respawn after a certain time
  441.     self.deadflag = DEAD_DEAD;
  442. };
  443.  
  444. vector(float dm) VelocityForDamage =
  445. {
  446.     local vector v;
  447.  
  448.     v_x = 100 * crandom();
  449.     v_y = 100 * crandom();
  450.     v_z = 200 + 100 * random();
  451.  
  452.     if (dm > -50) {
  453. //              dprint ("level 1\n");
  454.         v = v * 0.7;
  455.     } else if (dm > -200) {
  456. //              dprint ("level 3\n");
  457.         v = v * 2;
  458.     } else if (dm > -300) {
  459.         v = v * 3;
  460.     } else if (dm > -400) {
  461.         v = v * 4;
  462.     } else if (dm > -500) {
  463.         v = v * 5;
  464.     } else if (dm > -600) {
  465.         v = v * 6;
  466.     } 
  467.     else v = v * 10;
  468.  
  469.     return v;
  470. };
  471.  
  472. void(string gibname, float dm) ThrowGib =
  473. {
  474.     local   entity new;
  475.  
  476.     new = spawn();
  477.     new.origin = self.origin;
  478.     setmodel (new, gibname);
  479.     setsize (new, '0 0 0', '0 0 0');
  480.     new.velocity = VelocityForDamage (dm);
  481.     new.movetype = MOVETYPE_BOUNCE;
  482.     new.solid = SOLID_BBOX;
  483.     new.avelocity_x = random()*600;
  484.     new.avelocity_y = random()*600;
  485.     new.avelocity_z = random()*600;
  486.     new.think = SUB_Remove;
  487.     new.ltime = time;
  488.     new.nextthink = time + (10 + random()*15)/numplayers;
  489.     new.frame = 0;
  490.     new.flags = 0;
  491. };
  492.  
  493. void(string gibname, float dm) ThrowHead =
  494. {
  495.     setmodel (self, gibname);
  496.     self.frame = 0;
  497.     self.movetype = MOVETYPE_BOUNCE;
  498.     self.takedamage = DAMAGE_NO;
  499. //    Godel qc: Make heads solid but have no size to trigger porters.
  500.     self.solid = SOLID_BBOX;
  501. //    setsize (self, '-16 -16 0', '16 16 56');
  502.     setsize (self, '0 0 0', '0 0 0');
  503.     self.velocity = VelocityForDamage (dm);
  504.     self.view_ofs = '0 0 8';
  505.     self.origin_z = self.origin_z - 24;
  506.     self.flags = self.flags - (self.flags & FL_ONGROUND);
  507.     self.avelocity = crandom() * '0 600 0';
  508. // Dont remove a client!  Whoah!  I did this once.
  509.     if(self.flags & FL_CLIENT){
  510.         self.nextthink= -1;
  511.     } else {
  512.         self.nextthink = (time+10+random()*15)/numplayers;
  513.         self.think=SUB_Remove;
  514.     }
  515. };
  516.  
  517.  
  518. void() GibPlayer =
  519. {
  520.     ThrowGib ("progs/gib1.mdl", self.health);
  521.     ThrowGib ("progs/gib1.mdl", self.health);
  522.     ThrowGib ("progs/gib2.mdl", self.health);
  523.     ThrowGib ("progs/gib3.mdl", self.health);
  524.     ThrowGib ("progs/gib2.mdl", self.health);
  525.     ThrowGib ("progs/gib3.mdl", self.health);
  526.     ThrowGib ("progs/gib2.mdl", self.health);
  527.     ThrowGib ("progs/gib3.mdl", self.health);
  528.     ThrowHead ("progs/h_player.mdl", self.health);
  529.  
  530.     self.deadflag = DEAD_DEAD;
  531.  
  532.     if (damage_attacker.classname == "teledeath")
  533.     {
  534.         sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
  535.         return;
  536.     }
  537.  
  538.     if (damage_attacker.classname == "teledeath2")
  539.     {
  540.         sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
  541.         return;
  542.     }
  543.         
  544.     if (random() < 0.5)
  545.         sound (self, CHAN_VOICE, "player/gib.wav", 1, ATTN_NONE);
  546.     else
  547.         sound (self, CHAN_VOICE, "player/udeath.wav", 1, ATTN_NONE);
  548. };
  549.  
  550. void() PlayerDie =
  551. {
  552.     local   float   i;
  553.     
  554.     self.items = self.items - (self.items & IT_INVISIBILITY);
  555.     self.invisible_finished = 0;    // don't die as eyes
  556.     self.invincible_finished = 0;
  557.     self.super_damage_finished = 0;
  558.     self.radsuit_finished = 0;
  559.     self.modelindex = modelindex_player;    // don't use eyes
  560.  
  561.     if (deathmatch || coop)
  562.         DropBackpack();
  563.     
  564.     self.weaponmodel="";
  565.     self.view_ofs = '0 0 -8';
  566.     self.deadflag = DEAD_DYING;
  567.     self.solid = SOLID_NOT;
  568.     self.flags = self.flags - (self.flags & (FL_ONGROUND | FL_OBSERVER | FL_HASMINION));
  569.     self.movetype = MOVETYPE_TOSS;
  570.     if (self.velocity_z < 10)
  571.         self.velocity_z = self.velocity_z + random()*300;
  572.  
  573.     if (self.health < -40)
  574.     {
  575.         GibPlayer ();
  576.         return;
  577.     } else if (self.watertype== -5) {
  578.         self.health=-200;
  579.         GibPlayer ();
  580.         return;
  581.     }
  582.  
  583.     DeathSound();
  584.     
  585.     self.angles_x = 0;
  586.     self.angles_z = 0;
  587.     
  588.     if (self.weapon == IT_AXE)
  589.     {
  590.         player_die_ax1 ();
  591.         return;
  592.     }
  593.     
  594.     i = cvar("temp1");
  595.     if (!i)
  596.         i = 1 + floor(random()*6);
  597.     
  598.     if (i == 1)
  599.         player_diea1();
  600.     else if (i == 2)
  601.         player_dieb1();
  602.     else if (i == 3)
  603.         player_diec1();
  604.     else if (i == 4)
  605.         player_died1();
  606.     else
  607.         player_diee1();
  608.  
  609. };
  610.  
  611. void() set_suicide_frame =
  612. {       // used by klill command and diconnect command
  613.     local float r;
  614.     r=random();
  615. //    Godel qc: Observer mode exits when player suicides
  616.     if (self.flags & FL_OBSERVER) {
  617.         dprint(self.netname);
  618.         dprint(" is no longer an observer.\n");
  619.     }
  620.     if (self.model != "progs/player.mdl")
  621.         return; // allready gibbed
  622.     self.modelindex=modelindex_player;
  623.     self.frame = $deatha11;
  624.     self.solid = SOLID_NOT;
  625.     self.movetype = MOVETYPE_TOSS;
  626.     self.deadflag = DEAD_DEAD;
  627.     self.flags=self.flags-(self.flags & (FL_OBSERVER | FL_HASMINION ));
  628.     self.think = SUB_Gib;
  629.     self.nextthink = time+120;
  630.     if(r < 0.5) {
  631.         self.health= (r * -150);
  632.         GibPlayer();
  633.     }
  634. };
  635.  
  636.  
  637. void()  player_diea1    =       [       $deatha1,       player_diea2    ] {};
  638. void()  player_diea2    =       [       $deatha2,       player_diea3    ] {};
  639. void()  player_diea3    =       [       $deatha3,       player_diea4    ] {};
  640. void()  player_diea4    =       [       $deatha4,       player_diea5    ] {};
  641. void()  player_diea5    =       [       $deatha5,       player_diea6    ] {};
  642. void()  player_diea6    =       [       $deatha6,       player_diea7    ] {};
  643. void()  player_diea7    =       [       $deatha7,       player_diea8    ] {};
  644. void()  player_diea8    =       [       $deatha8,       player_diea9    ] {};
  645. void()  player_diea9    =       [       $deatha9,       player_diea10   ] {};
  646. void()  player_diea10   =       [       $deatha10,      player_diea11   ] {};
  647. void()  player_diea11   =       [       $deatha11,      player_diea11 ] {PlayerDead();};
  648.  
  649. void()  player_dieb1    =       [       $deathb1,       player_dieb2    ] {};
  650. void()  player_dieb2    =       [       $deathb2,       player_dieb3    ] {};
  651. void()  player_dieb3    =       [       $deathb3,       player_dieb4    ] {};
  652. void()  player_dieb4    =       [       $deathb4,       player_dieb5    ] {};
  653. void()  player_dieb5    =       [       $deathb5,       player_dieb6    ] {};
  654. void()  player_dieb6    =       [       $deathb6,       player_dieb7    ] {};
  655. void()  player_dieb7    =       [       $deathb7,       player_dieb8    ] {};
  656. void()  player_dieb8    =       [       $deathb8,       player_dieb9    ] {};
  657. void()  player_dieb9    =       [       $deathb9,       player_dieb9    ] {PlayerDead();};
  658.  
  659. void()  player_diec1    =       [       $deathc1,       player_diec2    ] {};
  660. void()  player_diec2    =       [       $deathc2,       player_diec3    ] {};
  661. void()  player_diec3    =       [       $deathc3,       player_diec4    ] {};
  662. void()  player_diec4    =       [       $deathc4,       player_diec5    ] {};
  663. void()  player_diec5    =       [       $deathc5,       player_diec6    ] {};
  664. void()  player_diec6    =       [       $deathc6,       player_diec7    ] {};
  665. void()  player_diec7    =       [       $deathc7,       player_diec8    ] {};
  666. void()  player_diec8    =       [       $deathc8,       player_diec9    ] {};
  667. void()  player_diec9    =       [       $deathc9,       player_diec10   ] {};
  668. void()  player_diec10   =       [       $deathc10,      player_diec11   ] {};
  669. void()  player_diec11   =       [       $deathc11,      player_diec12   ] {};
  670. void()  player_diec12   =       [       $deathc12,      player_diec13   ] {};
  671. void()  player_diec13   =       [       $deathc13,      player_diec14   ] {};
  672. void()  player_diec14   =       [       $deathc14,      player_diec15   ] {};
  673. void()  player_diec15   =       [       $deathc15,      player_diec15 ] {PlayerDead();};
  674.  
  675. void()  player_died1    =       [       $deathd1,       player_died2    ] {};
  676. void()  player_died2    =       [       $deathd2,       player_died3    ] {};
  677. void()  player_died3    =       [       $deathd3,       player_died4    ] {};
  678. void()  player_died4    =       [       $deathd4,       player_died5    ] {};
  679. void()  player_died5    =       [       $deathd5,       player_died6    ] {};
  680. void()  player_died6    =       [       $deathd6,       player_died7    ] {};
  681. void()  player_died7    =       [       $deathd7,       player_died8    ] {};
  682. void()  player_died8    =       [       $deathd8,       player_died9    ] {};
  683. void()  player_died9    =       [       $deathd9,       player_died9    ] {PlayerDead();};
  684.  
  685. void()  player_diee1    =       [       $deathe1,       player_diee2    ] {};
  686. void()  player_diee2    =       [       $deathe2,       player_diee3    ] {};
  687. void()  player_diee3    =       [       $deathe3,       player_diee4    ] {};
  688. void()  player_diee4    =       [       $deathe4,       player_diee5    ] {};
  689. void()  player_diee5    =       [       $deathe5,       player_diee6    ] {};
  690. void()  player_diee6    =       [       $deathe6,       player_diee7    ] {};
  691. void()  player_diee7    =       [       $deathe7,       player_diee8    ] {};
  692. void()  player_diee8    =       [       $deathe8,       player_diee9    ] {};
  693. void()  player_diee9    =       [       $deathe9,       player_diee9    ] {PlayerDead();};
  694.  
  695. void()  player_die_ax1  =       [       $axdeth1,       player_die_ax2  ] {};
  696. void()  player_die_ax2  =       [       $axdeth2,       player_die_ax3  ] {};
  697. void()  player_die_ax3  =       [       $axdeth3,       player_die_ax4  ] {};
  698. void()  player_die_ax4  =       [       $axdeth4,       player_die_ax5  ] {};
  699. void()  player_die_ax5  =       [       $axdeth5,       player_die_ax6  ] {};
  700. void()  player_die_ax6  =       [       $axdeth6,       player_die_ax7  ] {};
  701. void()  player_die_ax7  =       [       $axdeth7,       player_die_ax8  ] {};
  702. void()  player_die_ax8  =       [       $axdeth8,       player_die_ax9  ] {};
  703. void()  player_die_ax9  =       [       $axdeth9,       player_die_ax9  ] {PlayerDead();};
  704.